<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
  </head>

  <body>
    <script>
      window.log = console.log;
    </script>
    <script src="/dist/vue.js"></script>
    <!--    <script src="../dist/main.js"></script>-->
    <div id="app" style="color: green">
      <div>{{arr}}</div>
    </div>

    <script>
      Vue.mixin({
        a: 1,
        beforeCreate() {
          log("mixin--1--beforeCreate--");
        },
        created() {
          log("mixin--1--created----");
        },
      });
      Vue.mixin({
        a: 2,
        b: 2,
        beforeCreate() {
          log("mixin--2--beforeCreate--");
        },
        created() {
          log("mixin-2---created----");
        },
      });
      const vm = new Vue({
        el: "#app",
        data() {
          return {
            arr: [[23, 566]], // 使用了 JSON。stringify() 方法会取值，产生 dep
            // arr: {
            //   a: 1,
            // },
          };
        },
        beforeCreate() {
          log("beforeCreate----");
        },
        created() {
          log("created--");
        },
        mounted() {
          log("mounted-----");
        },
      });
      setTimeout(() => {
        // vm.arr.a = "你好";
        vm.arr[0].push("rerer");
        // vm.arr = 3434;
      }, 2000);
      // log(vm.name.push("4545"));
      // log(vm.name);
    </script>
  </body>
</html>
